<template>
    <div class="right vipList">
    <div class="level_tit tit clearfix">
			<span class="pull-left">会员列表</span>
			<router-link to="/addVip" style="color: #fff;text-decoration: none;"><button class="btn btn-primary pull-right add">+添加新会员</button></router-link>
		</div>
		<table class="table table-striped" id="vipList">
			<thead>
				<th>编号</th>
				<th>会员名称</th>
				<th>邮件地址</th>
				<th>手机号码</th>
				<th>是否验证</th>
				<th>可用资金</th>
				<th>冻结资金</th>
				<th>注册日期</th>
				<th>操作</th>
			</thead>
			<tbody>
				<tr v-for="(obj,index) in arr">
					<td>{{index+1}}</td>
					<td>{{obj.name}}</td>
					<td>{{obj.name}}@sina.cn</td>
					<td>{{obj.number}}</td>
					<td>DeathGhost</td>
					<td>￥ 5000000.00</td>
					<td>￥ 300.00</td>
					<td>{{obj.time}}</td>
					<td><img src="../images/operate_icon_11.jpg" v-on:click="delet(index)" alt=""></td>
				</tr>
			</tbody>
		</table>
	</div>
</template>
<script>
	import getTime from '../js/getTime'
	
    export default {
        data(){
            return {
                arr:[
					...JSON.parse(localStorage.data).reverse(),
					{
						name:"DeathGhost",
                        email:"DeathGhost@sina.cn",
                        psd:"111",
                        number:"18309275673",
                        time:getTime()
					}
				]
            }
        },
		methods:{
			delet(ind){
				this.arr.splice(ind,1);
				localStorage.data = JSON.stringify(this.arr);
			}
		},
		filters:{
			search(val){
				console.log(val);
			}
		}
    }
</script>
<style scoped>
	.level_tit{
		background:url("../images/vip_list_03.jpg") 5px 25px no-repeat;
	}
</style>